package com.shihb.behavioralpatterns.observerpattern;

/**
 *Description:
 *Version:1.0.0
 *@author shihb
 *@date 2020/7/28 21:32
 */
public class Sina implements Observer {
  private String temperature;
  private String humidity;

  @Override
  public void update(String temperature, String humidity) {
    this.temperature=temperature;
    this.humidity=humidity;
    show();
  }
  public void show(){
    System.out.println("++++新浪天气++++");
    System.out.println("温度:"+temperature);
    System.out.println("湿度:"+humidity);
  }

}
